home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / inline22.zip / UNINLINE.DOC < prev    next >
Text File  |  1988-03-05  |  5KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                      March 5, 1988
  9.  
  10.                         UNINLINE--AN INLINE DISASSEMBLER
  11.                                    Version 1.1
  12.  
  13.  
  14.         OVERVIEW
  15.  
  16.         UNINLINE.EXE is a disassembler which accepts an 'object' file 
  17.         consisting of Turbo Pascal (tm) Inline statements and produces an 
  18.         assembly language source file.  The source file may then be 
  19.         modified and reassembled to Inline statements using INLINE.EXE.
  20.  
  21.         Figure 1 shows an Inline statement input file and Figure 2, the 
  22.         resulting source code disassembly.
  23.  
  24.  
  25.         LOADING AND RUNNING UNINLINE
  26.  
  27.         First create an EXE file, UNINLINE.EXE, by compiling UNINLINE.PAS 
  28.         using version 4 of the Turbo Pascal compiler.  The files 
  29.         UNPARS.INC and FLPT.INC are also required for compilation.  
  30.  
  31.         UNINLINE is called at the DOS prompt with two filename parameters 
  32.         specifying the names of the object and source files.  If no 
  33.         extensions are given, .OBJ and .ASM are used by default.  For 
  34.         instance,
  35.  
  36.           UNINLINE ABC DEF
  37.  
  38.         will cause UNINLINE to look for an object file, ABC.OBJ, and 
  39.         create a source file DEF.ASM.  Files with no extension may be 
  40.         input or created by using a simple '.' for the extension.
  41.  
  42.         If the second filename is missing from the command line, an ASM 
  43.         file will be created using the same name as the object file.  If 
  44.         neither filename is specified, then names will be requested once 
  45.         execution starts.
  46.  
  47.         Once execution begins, UNINLINE will run to completion with the 
  48.         only console output being error messages.
  49.  
  50.  
  51.         OPERATION
  52.  
  53.           1. UNINLINE should accept any syntax within an Inline statement 
  54.              which is acceptable by Turbo Pascal.  Disassembly starts 
  55.              with the word 'Inline' and ends with the ending ')'.  
  56.              Intervening Pascal comments are ignored.  Thus it is 
  57.              possible to digest an entire Pascal source file processing 
  58.              only the Inline statements.
  59.  
  60.  
  61.  
  62.                                    1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.           2. The source code instructions resulting from each Inline 
  75.              statement are separated by the pseudo-instruction, NEW.  
  76.              When reassembled using INLINE.EXE, the NEW instruction 
  77.              causes separate Inline statements to be generated.
  78.  
  79.           3. Labels are inserted in the assembly language source code as 
  80.              required.  Labels consist of the letter, X, and a decimal 
  81.              number which is the number of bytes from the start of the 
  82.              disassembly.  Labels are only inserted on those instructions 
  83.              which are the destination of a jump or call.
  84.  
  85.  
  86.  
  87.  
  88.         VERSIONS
  89.  
  90.         1.1 Convert source for Turbo 4.
  91.  
  92.  
  93.  
  94.         (C) Copyright 1985,86 by L. David Baldwin.
  95.  
  96.         UNINLINE may be copied and distributed freely providing that no 
  97.         fee is charged and it is not part of a package for which a charge 
  98.         is made.
  99.  
  100.         Please report all bugs, suggestions, and problems to Dave 
  101.         Baldwin, CompuServe ID #76327,53.
  102.  
  103.              22 Fox Den Rd., (Summer)     144 13th St. East,  (Winter)
  104.              Hollis, NH 03049             Tierra Verde, FL 33715
  105.              (603) 465-7857               (813) 867-3030
  106.  
  107.  
  108.              Turbo Pascal is a trademark of Borland International Inc.
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                    2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.         Inline($FC/$8A/$86/>CH/$8B/$8E/>LIMIT/$09/$C9/$9C/$79/$03/
  144.           $F7/$D9/$FD/$89/$CA/$C4/$BE/>T/$F2/$AE/$75/$01/$41/$29/$CA/
  145.           $9D/$79/$02/$F7/$DA/$89/$96/>RSLT);
  146.  
  147.  
  148.                       Figure 1: Inline Statement Input File
  149.  
  150.  
  151.  
  152.               CLD
  153.               MOV     AL,[BP+>CH]
  154.               MOV     CX,[BP+>LIMIT]
  155.               OR      CX,CX
  156.               PUSHF
  157.               JNS     X17
  158.               NEG     CX
  159.               STD
  160.         X17:  MOV     DX,CX
  161.               LES     DI,[BP+>T]
  162.               REPNE
  163.               SCASB
  164.               JNZ     X28
  165.               INC     CX
  166.         X28:  SUB     DX,CX
  167.               POPF
  168.               JNS     X35
  169.               NEG     DX
  170.         X35:  MOV     [BP+>RSLT],DX
  171.                 
  172.  
  173.                        Figure 2:  Disassembled Output File
  174.                 
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                    3
  195.  
  196.  
  197.  
  198.  
  199.